package com.yuyou.fn.tms.vo;

import com.yuyou.fn.educational.entity.StudentSchool;
import com.yuyou.fn.platform.entity.City;
import com.yuyou.fn.platform.entity.Province;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

/**
 * Created by lzh on 2019/1/24.
 */
public class TmsSchool {
    @ApiModelProperty("生源学校id")
    private Long fsId ;//生源学校id

    @ApiModelProperty("生源学校名称")
    private String fsName ;//生源学校名称

    @ApiModelProperty("省份id")
    private Long fsProvinceId ;//省份id

    @ApiModelProperty("省份名称")
    private String fsProvinceName ;//省份名称

    @ApiModelProperty("城市id")
    private Long fsCityId ;//城市id

    @ApiModelProperty("城市名称")
    private String fsCityName ;//城市名称

    @ApiModelProperty("校区地址")
    private String fsAddress ;//校区地址

    @ApiModelProperty("状态(0正常,1停用)")
    private Integer fsStatus ;//状态(0正常,1停用)

    @ApiModelProperty("创建时间")
    private Date fsCreateTime ;//创建时间

    @ApiModelProperty("修改时间")
    private Date fsModifyTime ;//修改时间

    public TmsSchool(StudentSchool studentSchool, Province province, City city){
        this.setFsId(studentSchool.getStudentSchoolId());//生源学校id
        this.setFsName(studentSchool.getSchoolName());//生源学校名称
        if (province!=null){
            this.setFsProvinceId(province.getProvinceId());//省份id
            this.setFsProvinceName(province.getProvinceName());//省份名称
        }
        if (city!=null){
            this.setFsCityId(city.getCityId());//城市id
            this.setFsCityName(city.getCityName());//城市名称
        }

        this.setFsAddress(studentSchool.getAddress());//校区地址
        this.setFsStatus(0);//状态(0正常,1停用)
        this.setFsCreateTime(studentSchool.getCreateTime());//创建时间
        this.setFsModifyTime(studentSchool.getUpdateTime());//修改时间
    }

    public Long getFsId() {
        return fsId;
    }

    public void setFsId(Long fsId) {
        this.fsId = fsId;
    }

    public String getFsName() {
        return fsName;
    }

    public void setFsName(String fsName) {
        this.fsName = fsName;
    }

    public Long getFsProvinceId() {
        return fsProvinceId;
    }

    public void setFsProvinceId(Long fsProvinceId) {
        this.fsProvinceId = fsProvinceId;
    }

    public String getFsProvinceName() {
        return fsProvinceName;
    }

    public void setFsProvinceName(String fsProvinceName) {
        this.fsProvinceName = fsProvinceName;
    }

    public Long getFsCityId() {
        return fsCityId;
    }

    public void setFsCityId(Long fsCityId) {
        this.fsCityId = fsCityId;
    }

    public String getFsCityName() {
        return fsCityName;
    }

    public void setFsCityName(String fsCityName) {
        this.fsCityName = fsCityName;
    }

    public String getFsAddress() {
        return fsAddress;
    }

    public void setFsAddress(String fsAddress) {
        this.fsAddress = fsAddress;
    }

    public Integer getFsStatus() {
        return fsStatus;
    }

    public void setFsStatus(Integer fsStatus) {
        this.fsStatus = fsStatus;
    }

    public Date getFsCreateTime() {
        return fsCreateTime;
    }

    public void setFsCreateTime(Date fsCreateTime) {
        this.fsCreateTime = fsCreateTime;
    }

    public Date getFsModifyTime() {
        return fsModifyTime;
    }

    public void setFsModifyTime(Date fsModifyTime) {
        this.fsModifyTime = fsModifyTime;
    }
}
